/*
 * Copyright (c) 2016-2018 Wuhan Yryz Network Company LTD.
 */
package com.common.response;

import java.io.Serializable;
import java.util.List;

/**
 * @Description: 分页对象

 * @version 1.0
 */
public class PageList<T> implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1433729327463356559L;

    /**页码*/
    private Long pageNum = 1L;
    /**每页大小*/
    private Long pageSize = 10L;
    /**实体数据集合*/
    private List<T> entities;
    /**总页码*/
    private Long count;

    public PageList(){

    }

    public PageList(List<T> entities,Long pageNum,Long pageSize,Long count){
        this.entities=entities;
        this.pageNum=pageNum;
        this.pageSize=pageSize;
        this.count=count;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getPageNum() {
        return pageNum;
    }

    public void setPageNum(Long pageNum) {
        this.pageNum = pageNum;
    }

    public Long getPageSize() {
        return pageSize;
    }

    public void setPageSize(Long pageSize) {
        this.pageSize = pageSize;
    }

    public List<T> getEntities() {
        return entities;
    }

    public void setEntities(List<T> entities) {
        this.entities = entities;
    }

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    @Override
    public String toString() {
        return "PageList{" +
                "pageNum=" + pageNum +
                ", pageSize=" + pageSize +
                ", entities=" + entities +
                ", count=" + count +
                '}';
    }

}
